麻雀视频[优].js 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. var rule = {
  2. title: '麻雀视频[优]',
  3. host: 'https://www.mqtv.cc',
  4. parse_url: 'https://player.mqtv.cc/fun/?url=',
  5. url: '/libs/VodList.api.php?type=fyclass&rank=rankhot&cat=&year=&area=&page=fypage',
  6. searchUrl: '/libs/VodList.api.php?search=**',
  7. //detailUrl:'/libs/VodInfo.api.php?ctid=fyid',
  8. searchable: 2,
  9. quickSearch: 0,
  10. filterable: 1,
  11. filter: '',
  12. filter_url: '',
  13. filter_def: {},
  14. headers: {
  15. 'User-Agent': 'MOBILE_UA',
  16. },
  17. timeout: 5000,
  18. class_name: '电影&电视剧&综艺&动漫',
  19. class_url: 'movie&tv&va&ct',
  20. cate_exclude: '',
  21. play_parse: true,
  22. is_video: 'obj/tos',
  23. lazy: $js.toString(() => {
  24. input = {
  25. parse: 1,
  26. url: rule.parse_url + input,
  27. js: "$('.player-btn').click()",
  28. parse_extra: '&is_pc=1&custom_regex=' + rule.is_video
  29. };
  30. }),
  31. double: true,
  32. 推荐: '',
  33. 预处理: $js.toString(() => {
  34. let xrequest = request;
  35. (function() {
  36. request = function(url, obj) {
  37. function setCookie() {
  38. let {
  39. cookie
  40. } = reqCookie(HOST);
  41. rule.headers["cookie"] = cookie;
  42. return rule.headers;
  43. }
  44. let result = xrequest(url, obj);
  45. if (result == "") {
  46. result = xrequest(url, {
  47. headers: setCookie()
  48. });
  49. }
  50. return result;
  51. }
  52. })()
  53. }),
  54. 一级: 'json:data;title;img;remark;url;desc',
  55. 二级: $js.toString(() => {
  56. VOD = {};
  57. log(input);
  58. let ctid = input.match(/.*\/(\d+)/)[1];
  59. // log(ctid);
  60. let detailUrl = 'https://www.mqtv.cc/libs/VodInfo.api.php?ctid=' + ctid;
  61. log('detailUrl:' + detailUrl);
  62. let html = request(detailUrl);
  63. let json = JSON.parse(html);
  64. // log(json);
  65. VOD.vod_name = json.data.title;
  66. VOD.vod_id = input;
  67. VOD.vod_pic = json.data.img;
  68. VOD.vod_year = json.data.year;
  69. VOD.vod_area = json.data.area;
  70. VOD.vod_remarks = json.data.remark;
  71. VOD.vod_play_from = json.data.playinfo.map(it => it.cnsite).join('$$$');
  72. let playUrls = [];
  73. json.data.playinfo.forEach((it) => {
  74. let plist = it.player.map(it => it.no + '$' + it.url).join('#');
  75. playUrls.push(plist);
  76. });
  77. VOD.vod_play_url = playUrls.join('$$$');
  78. }),
  79. 搜索: 'json:data.vod_all[0].show;title;img;remark;url;desc',
  80. }